package main

import (
	"fmt"
)

// 利用const定义枚举类型
const (
	Sunday = iota //每行iota累加1,iota只能用在const()中
	Monday
	Tuesday
	Wednesday
	Thursday
)

func goConst() {
	//定义常量
	const a int = 1
	fmt.Printf("a type: %T\n", a)

	fmt.Printf("Sunday type: %T\n", Sunday)
}
